@extends('app')

@section('content')
<h4 class="page-header">青苜社区内容设置</h4>
<div class="description2">
    <form action="{{ url('admin/bbs/permission') }}" method="post">
      <table class="table table-striped">
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-4 col-xs-3 control-label">启用分类功能:</span>
                  <div class="col-sm-5 col-xs-8">
                      <label class="radio-inline">
                        <input type="radio" name="category_enable" value="Y" @if($result['category_enable'] == 'Y') checked @endif> 只允许回复一次 
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="category_enable" value="N" @if($result['category_enable'] == 'N') checked @endif> 不限制
                      </label>
                  </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-4 col-xs-3 control-label">允许上传附件:</span>
                  <div class="col-sm-5 col-xs-8">
                      <label class="radio-inline">
                        <input type="radio" name="upload_enable" value="Y" @if($result['upload_enable'] == 'Y') checked @endif> 是 
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="upload_enable" value="N" @if($result['upload_enable'] == 'N') checked @endif> 否
                      </label>
                  </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-4 col-xs-3 control-label">允许上传附件:</span>
                  <div class="col-sm-5 col-xs-8">
                      <label class="radio-inline">
                        <input type="radio" name="upload_enable" value="Y" @if($result['upload_enable'] == 'Y') checked @endif> 是 
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="upload_enable" value="N" @if($result['upload_enable'] == 'N') checked @endif> 否
                      </label>
                  </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                   <span class="col-sm-4 col-xs-3 control-label">允许的附件文件类型:</span>
                   <div class="col-sm-5 col-xs-8">
                      <input type="text" name="allowed_upload_types" class="form-control" value="{{ $result['allowed_upload_types'] }}"> 
                   </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-4 col-xs-3 control-label">允许上传最大附件大小:</span>
                  <div class="col-sm-5 col-xs-8">
                      <input type="text" name="upload_size_limit" class="form-control" value="{{ $result['upload_size_limit'] }}">
                      <div class="help-block" >单位：KB</div>
                  </div>
                  <div class="clear"></div>  
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-4 col-xs-3 control-label">回复内容最小字符数限制:</span>
                  <div class="col-sm-5 col-xs-8">
                      <input type="text" name="answer_length_lower" class="form-control" value="{{ $result['answer_length_lower'] }}">
                      <div class="help-block">0为不限制</div>
                  </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-4 col-xs-3 control-label">问题标题最大字符数限制:</span>
                  <div class="col-sm-5 col-xs-8">
                      <input type="text" name="question_title_limit" class="form-control" value="{{ $result['question_title_limit'] }}">
                      <div class="help-block">0为不限制</div>
                  </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-4 col-xs-3 control-label">问题内容最大字符数限制:</span>
                  <div class="col-sm-5 col-xs-8">
                      <input type="text" name="question_content_limit" class="form-control" value="{{ $result['question_content_limit'] }}">
                      <div class="help-block">0为不限制</div>
                  </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-4 col-xs-3 control-label">自动展开评论:</span>
                  <div class="col-sm-5 col-xs-8">
                      <label class="radio-inline">
                        <input type="radio" name="unfold_question_comments" value="Y" @if($result['unfold_question_comments'] == 'Y') checked @endif> 是 
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="unfold_question_comments" value="N" @if($result['unfold_question_comments'] == 'N') checked @endif> 否
                      </label>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-4 col-xs-3 control-label">评论内容最大字符数限制:</span>
                  <div class="col-sm-5 col-xs-8">
                      <input type="text" name="comment_limit" class="form-control" value="{{ $result['comment_limit'] }}">
                      <div class="help-block">0为不限制</div>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-4 col-xs-3 control-label">问题举报理由选项:</span>
                  <div class="col-sm-5 col-xs-8">
                      <textarea name="report_reason" rows="5" class="form-control textarea" >{{ trim($result['report_reason']) }}</textarea>
                      <div class="help-block">每行填写一个举报理由</div>
                  </div>
                </div>
            </td>
        </tr>
      </table>
        {!! csrf_field() !!}
        <div class="form-inline mt20">
            <div class="form-group">
              <input type="hidden" name="stauts" value="1">
              <input type="submit" class="btn btn-primary btn-block" id="save" value="保存" />
            </div>
            <div class="form-group ml30">
                <input type="reset" class="btn btn-default btn-block" value="重置" />
            </div>
        </div>
    </form>
</div>
@endsection
